package controllers

import (
	"github.com/gin-gonic/gin"
)

type OrderController struct{}

type Search struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

func (o OrderController) GetList(c *gin.Context) {
	/*param := make(map[string]interface{})
	err := c.BindJSON(&param)
	if err == nil {
		ReturnSuccess(c, 0, param["id"], param["name"], 1)
		return
	}*/

	search := &Search{}
	err := c.BindJSON(&search)
	if err == nil {
		ReturnSuccess(c, 0, search.Id, search.Name, 1)
		return
	}

	ReturnError(c, 4004, "没有相关信息order")
}
